<?php $groups = Doctrine::getTable('BbGroups')->fetchall(array('s_id'=>$seasonId))?>
<?php $season = Doctrine::getTable('BbSeason')->findOneBySId($seasonId)?>
<?php $league = Doctrine::getTable('BbLeague')->findOneById($season->getLId())?>
<?php $left=1; ?>
<div class="column-left">
	 <div class="news-title"><?php echo $league." :: ".$season ?></div>
  	</br> 
<?php foreach ($groups as $group):?>
	<?php $groupTeamsId = Doctrine::getTable('BbGrteams')->fetchArray(array('g_id'=>$group->getId())) ?>
	<div class="span-2 <?php  if ($left!=1)  echo "last"; ?>" >
		<div class="mod-container mod-open-list mod-teams-list-medium mod-no-footer">
			<div class="mod-header stathead"><h4><?php echo $group ?> хэсэг</h4></div>
			<div class="mod-content">
				<ul class="medium-logos">
				  <?php $i=1; foreach ($teams as $team):?>
            	  <?php if(in_array($team->getId() , $groupTeamsId)) {?>	
						<li class="<?php if($i==1) echo 'first'; elseif($i%2==0) echo 'alt';?>">
							<div>
								<?php echo image_tag("http://tlg13/images/logo-sprite-xugjil.jpg", array('alt'=>$team, 'style'=>'max-width:50px;max-height:50px; float:left; padding: 10px;	'))?>
								<h5><a class="bi" href="<?php echo url_for('team/show?seasonId='.$seasonId.'&name='.$team)?>"><?php echo $team?></a></h5>
								<span>
									<a href="<?php echo url_for('team/show?seasonId='.$seasonId.'&name='.$team)?>">Мэдээ</a> 
									| <a href="<?php echo url_for('team/show?seasonId='.$seasonId.'&name='.$team)?>">Хуваарь</a> | 
									<a href="<?php echo url_for('team/show?seasonId='.$seasonId.'&name='.$team)?>">Багийн Бүрэлдэхүүн</a> 
								</span>
								<br clear="all">
							</div>
						</li>
				   <?php } $i++; endforeach?>
				</ul>
			</div>	
		</div>
	</div>
<?php $left = $left!=1 ? 1 :0 ; endforeach?>

	
</div><!--column-left-->

<?php include_partial('main/right', array());?>

<br clear="all">
